Fix Issue #43 - Prevent MP loss when casting spell while swimming#142
Closed
crkellen wants to merge 5 commits intoTurningWheel:barony-nextfrom
Closed
Fix Issue #43 - Prevent MP loss when casting spell while swimming#142crkellen wants to merge 5 commits intoTurningWheel:barony-nextfrom
crkellen wants to merge 5 commits intoTurningWheel:barony-nextfrom
Conversation
added 5 commits
August 13, 2017 18:31
Update to Latest Code
…efore deducting mana
lheckemann
suggested changes
Sep 24, 2017
Contributor
lheckemann
left a comment
There was a problem hiding this comment.
Good in principle, but increases duplication even further than it's already gone. I'm not in favour of merging this as is.
Also the ever-present indentation issues — I'm going to stop mentioning those in the rest of my reviews, I'm sure you've got the idea now ;)
| } | ||
|
|
||
| // If both cases are false, the Caster could potentially be swimming | ||
| if ( bIsCasterLevitating != true && bIsCasterWaterWalking != true ) |
Contributor
There was a problem hiding this comment.
!= true is redundant on bools :)
| return; | ||
| } | ||
|
|
||
| // Check to make sure the Caster is not swimming |
Contributor
There was a problem hiding this comment.
There's a lot of conditions here which are duplicated (not only in here but in actplayer.cpp, acthudweapon.cpp, which should probably be factored out to reduce the duplication and the amount of code that needs to be changed should additional conditions for swimming be added.
Contributor
Author
|
I'll review this one further today or tomorrow.
null
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a fix for #43.
The issue was twofold: